/**
 * 
 */
package com.gwcloud.leetcode.offers;

/**
 * @ClassName   : Leetcode0050 
 * @author      : ganwei 
 * @date        : 2020年5月31日
 * @Description : Leetcode0050
 */
public class Leetcode0050 {
    public String replaceSpace(String s) {
    	StringBuilder sb = new StringBuilder();
    	for(int i = 0; i < s.length(); i++){
    		char c = s.charAt(i);
    		if(c == ' '){
    			sb.append("%20");
    		}else{
    			sb.append(c);
    		}
    	}
    	return sb.toString();
    }
}
